//
//  InitialValue.h
//  NSESolver
//
//  Created by Patrick Zulian on 3/29/11.
//  Copyright 2011 ICS - USI - Lugano. All rights reserved.
//

#ifndef NSESolver_InitialValue_H
#define NSESolver_InitialValue_H

#include "Types.h"

namespace nsesolver {
    
    class CFDProblem;
    
    void InitToOnes(Matrixd &m);
    void InitToZeros(Matrixd &m);
    
    /**
     * \brief The InitialValue class ... TODO Doc
     */ 
    class InitialValue {
    public:
        
        /// the function pointer type
        typedef void (*InitM) (Matrixd &m);
      
    private:
        InitM u0, v0;
    public:
        //InitialValue();
        /**
         *  \brief sets the function pointers used for initializing the velocity field
         *  \param u0 the horizontal velocity field initializer
         *  \param v0 the vertical velocity field initializer
         */
        InitialValue(InitM u0 = InitToZeros, InitM v0 = InitToZeros);
        
        
        /**
         * The Destructor
         */
        ~InitialValue();
        
        
        /**
         * \brief sets the intial value to the given problem
         * \param problem[IN,OUT]
         */
        void setInitialValues(CFDProblem &problem);
    };
    
}

#endif //NSESolver_InitialValue_H
